<template>
<!-- 公共Home组件 -->
    <div class="wrapper">
        <!-- 头部组件 -->
        <v-head></v-head>
        <!-- 侧边栏组件 -->
        <v-sidebar></v-sidebar>
        <div class="content-box" :class="{'content-collapse':collapse}">
            <div class="content">
                    <router-view></router-view>
                <el-backtop target=".content"></el-backtop>
            </div>
        </div>
    </div>
</template>

<script>
    import vHead from './Header.vue';
    import vSidebar from './Sidebar.vue';
    //import vTags from './Tags.vue';
    import bus from '../../utils/bus';
    export default {
        data() {
            return {
                tagsList: [],
                collapse: false
            };
        },
        components: {
            vHead,
            vSidebar,
            //vTags
        },
        methods:{
        },
        computed: {
            token() {
                return this.$store.state.token;
            },
            username() {
                return this.$store.state.username;
            },
            emp_name() {
                return null;
            }
        },
        created() {
            bus.$on('collapse-content', msg => {
                this.collapse = msg;
            });
        }
    };
</script>

<style>
.content-box {
    height: 100%
}
.content {
    height: 100%;
}
</style>